import Vue from 'vue'
import VueRouter from 'vue-router'
import Hmoe from '../views/Home'
import Layout from '../views/Layout.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    children:[{
      path: '/',
      name: 'Hmoe',
      component: Hmoe
    },
    {
      path: '/topic',
      name: 'Topic',
      component: () => import('../views/Topic.vue')
    },
    {
      path: '/mine',
      name: 'Mine',
      component: () => import('../views/Mine.vue')
    },
    {
      path: '/search',
      name: 'Search',
      component: () => import('../views/Search.vue')
    },]

  },
  {
    path
  }
  
]

const router = new VueRouter({
  routes,
  linkActiveClass:"active"
})

export default router
